import React, { Component } from 'react'
import Alter from "../comonpent/Alter"
export class Home extends Component {
  constructor(props) {
    super(props)
  
    this.state = {
       flag:false
    }
  }
  closeFn(){
    this.setState({
      flag:false
    })
  }
  render() {
    const {flag}=this.state
    return (
      <div>
        <button onClick={
          ()=>{
            this.setState({
              flag:true
            })
          }
        }>
         添加标签
        </button>

        <Alter flag={flag} closeFn={this.closeFn.bind(this)}></Alter>
        
      </div>
    )
  }
}

export default Home